package top.xana.acg.anime.config

import top.xana.acg.parser.BimiAcgParser
import top.xana.acg.parser.MalimaliParser
import java.util.*

/**
 * Created by xana on 2022/1/11
 * Describe: hello world
 */


val SERVER = "http://192.168.0.105"

val time = Date()

val week = time.day.let { if (it > 0) it - 1 else 6 }

val bimi = BimiAcgParser()
val mali = MalimaliParser()


fun main() {
    var resp: Any = bimi.getHomeBody()
//    resp = bimi.playUrl("http://www.bimiacg4.net/bangumi/2818/play/2/23/

    println(resp)
//    var resp: Any? = null

    //   resp = mali.search("从零开始")
//    resp = bimi.source("http://www.bimiacg4.net/bangumi/bi/909/")
//    resp = bimi.favor("http://www.bimiacg4.net/bangumi/bi/7923/")
    //   resp = bimi.timeline()
//    resp = bimi.category(1, p = 2)
//    resp = mali.source("https://www.malimali4.com/voddetail/24309.html")
//    if (resp is List<*>) {
//        resp.forEach {
//            println(it)
//        }
//    } else {
//        println(resp)
//        if (resp is Anime && resp.extra is List<*>) {
//            val r = resp.extra as List<*>
//            println("${r[2]} \n${r.last()}")
//        }
//    }

}